<?php

namespace Drupal\ui_mlt\Entity;

use Entity;

class UiMlt extends Entity {

  public $id;

  public $uid;

  public $root_path;

  public $item;

  public $item_title;

  public $destination = 1;

  public $query;

  public $created;

  public $changed;

  public function __construct($values = []) {
    parent::__construct($values, 'ui_mlt');
  }

  public function save() {
    $this->changed = REQUEST_TIME;
    if (empty($this->created)) {
      $this->created = REQUEST_TIME;
    }
    if (empty($this->uid)) {
      global $user;
      $this->uid = $user->uid;
    }
    parent::save();
  }
}
